package com.cafuc.game;

import java.awt.image.BufferedImage;

public class Missile {
    //炮弹的图片
    static BufferedImage[] images = {ImageUtil.readImg("imgs/missileU.gif"),
            ImageUtil.readImg("imgs/missileD.gif"),
            ImageUtil.readImg("imgs/missileL.gif"),
            ImageUtil.readImg("imgs/missileR.gif")
    };
    int direction;//子弹方向
    int speed; //子弹的速度
    BufferedImage image;//炮弹的图片
    int x;//炮弹坐标
    int y;
    public Missile(){

        speed = 20;

    }
    public void move(){
        if(direction==0){
            y=y-speed;
        }
        else if(direction==1){
            y=y+speed;
        }
        else if(direction==2){
            x=x-speed;

        }
        else if(direction==3){
            x=x+speed;
        }
    }
}
